
function check_lichthi($giatri)
{
    
gtdonvi=document.getElementById("donviluu").value;
if(gtdonvi=="")
    gtdonvi=document.getElementById("donvi").value;
    
var httpxml;
try
  {
  // Firefox, Opera 8.0+, Safari
  httpxml=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
		  try
	 		{
			 httpxml=new ActiveXObject("Msxml2.XMLHTTP");
			}
  			catch (e)
			{
    			try
      		{
      		httpxml=new ActiveXObject("Microsoft.XMLHTTP");
     		 }
    			catch (e)
      		{
      		alert("Your browser does not support AJAX!");
      		return false;
      		}
    		}
  }
function stateck() 
    {
        
    if(httpxml.readyState==4)
      {
        var myarray=eval(httpxml.responseText);
        
        
        loi=document.getElementById("loi");
        loi.style.color="red";
        loi.innerHTML="";
        var tong="";
        for (i=0;i<myarray.length;i++)
            {
             ngay=myarray[i];
             i++;
             tong=myarray[i];
            }
        if(tong!=0){
            loi.innerHTML=" Ngày: "+ ngay +" có "+tong+" lịch thi";   
        }            
      }
    }   
       
var url="daotao/check_lichthi.php?";
url=url+"donvi="+gtdonvi+"&ngaythi="+$giatri;
url=url+"&sid="+Math.random();

httpxml.onreadystatechange=stateck;
httpxml.open("GET",url,true);
httpxml.send(null);
}
//----------------------------------------------------------------------------------------------------------------------

